﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Remoting.Messaging;
using StockMatch.Service.AOPCustomAchieve;

namespace StockMatch.Service
{
    public class RolePowerAchieve:AOPInterceptAchieve
    {
        public override void BeforeAchieve(IMethodCallMessage callMsg)
        {

            if (callMsg == null)
            {
                return;
            }
            Console.WriteLine(callMsg.MethodName + "—Before—" + this.GetType().Name);
        }

        public override void AfterAchieve(IMethodReturnMessage returnMsg)
        {
            if (returnMsg == null)
            {
                return;
            }
            Console.WriteLine(returnMsg.MethodName + "—After—" + this.GetType().Name);
        }
    }
}
